// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'

Vue.config.productionTip = false

/*加载路由环境
*
* 1. 将vue-router 注册为 Vue的插件
* 2. 新建路由(路径和组件的映射关系)
* 3. 新建路由器
* 4. 将路由注册给路由器
* 5. 将路由器注册给Vue
* 6. 为路由组件进行占位
* */


import VueRouter from "vue-router";
Vue.use(VueRouter);

import A from "./components/A"
import B from "./components/B"
import C from "./components/C"
const routes = [
  {path:"/A",component:A},
  {path:"/B",component:B},
  {path:"/C",component:C}
]

const router = new VueRouter({
  routes:routes
})

/* eslint-disable no-new */
new Vue({
  el: '#app',
  components: { App },
  template: '<App/>',
  router:router
})
